from flask import Flask, jsonify
from flask import request

app = Flask(__name__)


@app.route('/json', methods=['GET'])
def json_demo():
    user = request.args.get('user')
    return {
        "username": user,
        "email": "111@qq.com"
    }

@app.route('/jsonfy')
def get_current_user():
    return jsonify(username='yoyo',
                   email='123@qq.com',
                   id=22)

if __name__ == '__main__':
    app.run();